#ifndef KEY_H
#define KEY_H
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#include <SDL.h>
#endif

#define KEY_DOWN SDLK_DOWN
#define KEY_UP SDLK_UP
#define KEY_ENTER SDLK_RETURN
#define KEY_BACK SDLK_BACKSPACE

#define KEY_INCREMENT SDLK_RIGHT
#define KEY_DECREMENT SDLK_LEFT

#define GET_KEY_STATE(key) ((key)->state)

typedef struct KEY {
    int keycode;  // 键码
    int state;    // 按键状态：按下或松开
} Key;



void key_event(void);



#endif // KEY_H